home *** CD-ROM | disk | FTP | other *** search
- Path: news.opennet.net.au!news
- From: george@opennet.net.au (Kenneth H Smith)
- Newsgroups: comp.lang.c
- Subject: Character string
- Date: 11 Apr 1996 10:00:04 GMT
- Organization: Mintchester Pty. Ltd.
- Message-ID: <4kil74$8i7@Tandem1.opennet.net.au>
- NNTP-Posting-Host: bri-du6-3.opennet.net.au
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.99.2
-
- How do I do a similar statement in C to the Pascal code:
-
- If Ch IN ['a','A'] THEN
-
- I want to execute a piece of code when a particular character is entered
- from the keyboard.
-
- I know I can use if (ch=='a') && (ch=='A') but was looking for something
- a little more ellegant.
-
- Thanks,
-
- Ken Smith.
-
-